<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="update">
    <input type="hidden" th:value="${goods.id}" name="id">
    标题：<input type="text" th:value="${goods.title}" name="title"><br>
    分类:
    <select name="typeId" th:value="${goods.typeId}">
        <option th:each="g : ${gtlist}" th:value="${g.id}" th:text="${g.name}"
                th:selected="${goods.typeId == g.id}">name
        </option>
    </select>
    <br>
    状态:
    <input type="radio" name="state" value="1" th:checked="${'1' eq goods.state}">上架
    <input type="radio" name="state" value="2" th:checked="${'2' eq goods.state}">下架
    <br>
    <button type="submit">修改</button>
</form>
</body>
</html>